package com.hades.example.java.refactoring.after.c10.c10_14_replace_error_code_with_exception.v2;

public class Example {
    public static void main(String[] args) {
        Account account = new Account();
        if (account.canWithdraw(10)) {
            account.withdraw(10);
            doTheUsualThing();
        } else {
            handleOverdrawn();
        }
    }

    private static void handleOverdrawn() {
    }

    private static void doTheUsualThing() {
    }
}